data constructor造句
例句與造句
- In Haskell, the following line defines an algebraic data type Color that has a single data constructor ColorConstructor that wraps an integer and a string.
- Somewhat similar to a function, a data constructor is applied to arguments of an appropriate type, yielding an instance of the data type to which the type constructor belongs.
- For example, the data constructor Leaf is logically a function Int-> Tree, meaning that giving an integer as an argument to Leaf produces a value of the type Tree.
- In type theory, we would say : nat = \ mu \ alpha . 1 + \ alpha where the two arms of the sum type represent the Zero and Succ data constructors.
- has kind ( * \ rightarrow * ) \ rightarrow * \ rightarrow *, i . e . unt is expected to be a unary data constructor, which gets applied to its argument, which must be a type, and returns another type.
- It's difficult to find data constructor in a sentence. 用data constructor造句挺難的
- In Haskell this is the foldl'( note the apostrophe, pronounced'prime') function in the Data . List library ( one needs to be aware of the fact though that forcing a value built with a lazy data constructor won't force its constituents automatically by itself ).